/*属性管理----------------Caesar-------------------------------------------------------------------*/
/*加载分级联查功能选项*/
var classValue = "";

function goods_listCategory(categoryLevel) {
    var categoryName = $("#class1").val();
    var user_data = {
        categoryLevel: categoryLevel,
        categoryName: $("#class1").val(),
    }
    var succCallBack = function(data, status, response) {
        console.log(data)
        if(data.errorCode == "0") {
            if(data.data == null) {
                classStr = "<li>无数据</li>"
                $("#classUl1").html(classStr);
            } else {
                var classStr = "";
                for(var i = 0; i < data.data.length; i++) {
                    classStr += "<li onclick='nextClass(" + data.data[i].category_id + "," + data.data[i].category_level + ",\"" + data.data[i].category_name + "\")'>" + data.data[i].category_name + "</li>"
                }
                $("#classUl1").html(classStr);
            }
        }
    };
    power();
    web.doAjax(root.goodsInter.categoryByParam, 'post', user_data, succCallBack);
}

//获取光标
$("#class1").focus(function() {
    $("#classUl1").show();
    goods_listCategory(1);
});
$(document).bind("click", function(e) {
    //id为menu的是菜单，id为open的是打开菜单的按钮
    if($(e.target).closest("#classUl1").length == 0 && $(e.target).closest("#class1").length == 0) {
        //点击id为menu之外且id不是不是open，则触发
        $("#classUl1").hide()
    }
});
var category_idOfquery;

// 2,3,4级的模糊查询
function getNext_input(level, category_id) {
    console.log(level)
    console.log(category_id)
    if(level == 4) {
        category_idOfquery = category_id;
        $("#class3")[0].oninput == goods_Attribute();
    }
    if(level < 4) {
        $("#class" + level + "")[0].oninput = function() {
            var user_data = {
                parentCateId: category_id,
                categoryName: $("#class" + level + "").val()
            }
            var succCallBack = function(data, status, response) {
                console.log(data)
                if(data.errorCode == 0) {
                    if(data.data == null) {
                        classStr = "<li>无数据</li>";
                    } else {
                        var classStr = "";
                        for(var i = 0; i < data.data.length; i++) {
                            classStr += "<li onclick='nextClass(" + data.data[i].category_id + "," + data.data[i].category_level + ",\"" + data.data[i].category_name + "\")'>" + data.data[i].category_name + "</li>"
                        }
                    }
                    if(data.data[0] == undefined) {
                        classValue = category_id;
                        var nextLevel = level + 1;
                        $("#classUl" + nextLevel + "").html(classStr);
                        $("#classUl" + level + "").hide();
                    } else {
                        var nextLevel = data.data[0].category_level;
                        $("#classUl" + nextLevel + "").html(classStr);
                        $("#classUl" + level + "").show();
                    }
                }
            }
            power();
            web.doAjax(root.goodsInter.categoryByParam, 'post', user_data, succCallBack);
        }
        //获取光标
        $("#class" + level + "").focus(function() {
            $("#classUl" + level + "").show();
        });
        $(document).bind("click", function(e) {
            //id为menu的是菜单，id为open的是打开菜单的按钮
            if($(e.target).closest("#classUl" + level + "").length == 0 && $(e.target).closest("#class" + level + "").length == 0) {
                //点击id为menu之外且id不是不是open，则触发
                $("#classUl" + level + "").hide()
            }
        });
    }

}

function nextClass(category_id, level, category_name) {
    $("#class" + level + "").val(category_name)
    if(level == 1) {
        $("#class2").val("");
        $("#class3").val("");
    } else if(level == 2) {
        $("#class3").val("");
    }
    var user_data = {
        parentCateId: category_id,
    }
    var succCallBack = function(data, status, response) {
        console.log(data)
        if(data.errorCode == "0") {
            if(data.data == null) {
                classStr = "<li>无数据</li>";
            } else {
                var classStr = "";
                for(var i = 0; i < data.data.length; i++) {
                    classStr += "<li onclick='nextClass(" + data.data[i].category_id + "," + data.data[i].category_level + ",\"" + data.data[i].category_name + "\")'>" + data.data[i].category_name + "</li>"
                }
            }
            if(data.data[0] == undefined) {
                classValue = category_id;
                var nextLevel = level + 1;
                $("#classUl" + nextLevel + "").html(classStr);
                $("#classUl" + level + "").hide();
            } else {
                var nextLevel = data.data[0].category_level;
                $("#classUl" + nextLevel + "").html(classStr);
                $("#classUl" + nextLevel + "").show();
                $("#classUl" + level + "").hide()
            }
        }
    }
    getNext_input(level + 1, category_id);
    power();
    web.doAjax(root.goodsInter.categoryByParam, 'post', user_data, succCallBack);
}

/*属性管理项值------start----*/

function goods_Attribute(category_id) {
    $("#property").empty();
    $("#propertyValue").empty();
    console.log($("#class3").val())
    if($("#class3").val() != "") {
        var user_data = {
            attribute_type: $("#attribute_type").val(),
            category_id: category_idOfquery
        }
        console.log(user_data)
        var succCallBack = function(data, status, response) {
            console.log(data)
            if(data.errorCode == "0") {
                $("#propertyValue").empty();
                if(data.data == "") {
                    $("#property").append('<li class="clearfix pl-10 mb-5">无数据</li>');
                    $("#property").append('<li id="goodsPropertyInp1" style="display: none" class="goodsPropertyRemove1 clearfix pl-10 mb-5"><div class="f-l pd-5"><input name="property1" type="radio" value="" class="radio" /><label class="pl-10" id="goodsProperty1"></label></div><div class=" f-l class-input"><input type="text" autofocus class="input-text radius f-l firstProperty1" name="" placeholder=""><div class="f-l"><span class="msgError" style="color: red;"></span></div><div class="f-l pt-5"><a href="##" onclick="addPropertyClass1(2,0,\'.firstProperty1\')" class="ml-10">确认</a><a href="##" onclick="celLableFirstAdd(\'#goodsPropertyInp1\')" class="ml-10">取消</a></div></div></li>')
                } else {
                    $("#property").append('<li id="goodsPropertyInp1" style="display: none" class="goodsPropertyRemove2 clearfix pl-10 mb-5"><div class="f-l pd-5"><label class="pl-10" id="goodsProperty1"></label></div><div class=" f-l class-input"><input type="text" autofocus class="input-text radius f-l firstProperty1" name="" placeholder=""><div class="f-l"><span class="msgError" style="color: red;"></span></div><div class="f-r pt-5"><a href="##" onclick="addPropertyClass1(2,0,\'.firstProperty1\')" class="ml-10">确认</a><a href="##" onclick="celLableFirstAdd(\'#goodsPropertyInp1\')" class="ml-10">取消</a></div></div></li>')
                    for(var i = 0; i < data.data.length; i++) {
                        $("#property").append('<li class="clearfix pl-10 mb-5"><div class="f-l pd-5">' + '<input onclick="goods_AttributeValue1(this.value)" name="property1" type="radio" value="' + data.data[i].attribute_id + '" class="radio" />' + '<label class="pl-10">' + data.data[i].attribute_code + ' <input title="' + data.data[i].attribute_name + '" type="text" value="' + data.data[i].attribute_name + '" disabled style="height: 24px;width: 145px;border: 0px;background: white;margin-top: -4px"></label></div><div class="f-r mt-5"><a onclick="firstPropertyAdd2(this,' + data.data[i].attribute_id + ')" href="##" class="Hui-iconfont icon-edit mr-10 powerButton 405">&#xe600;</a><a href="##" onclick="eidtPropertyInp1(\'#goodsPropertyInp1\',\'#goodsProperty1\',\'.firstProperty1\',\'' + data.data[i].attribute_code + '\',\'' + data.data[i].attribute_name + '\',\'' + data.data[i].attribute_id + '\')" class="Hui-iconfont icon-edit mr-10 powerButton 406">&#xe6df;</a><a href="##" onclick="deletePropertyClass1(\'' + data.data[i].attribute_id + '\')" class="Hui-iconfont icon-edit mr-10 powerButton 407">&#xe6e2;</a></div></li>')
                    }
                }
            }
            power();
        };
        return web.doAjax(root.goodsInter.goods_listAttribute, 'post', user_data, succCallBack);
    }
}

function firstPropertyAdd1() {
    $(".firstProperty1").css({
        border: "1px #ddd solid"
    })
    $(".msgError").html("")
    if($("#class3").val() != "") {
        $(".firstProperty1").val("");
        var container = $('.goodsPropertyRemove2');
        $(container).scrollTop(0);
        sessionStorage.setItem("isGoodsPropertyEdit", false);
        $("#goodsPropertyInp1").css({
            display: "block"
        });
        $("#goodsPropertyInp1").children().children("input").focus();
        var user_data = {
            categoryId: category_idOfquery
        }
        var succCallBack = function(data, status, response) {
            console.log(data)
            if(data.errorCode == "0") {
                sessionStorage.setItem('goods_addClass', JSON.stringify(data.data));
                $("#goodsProperty1").html(data.data);
            }
        };
        return web.doAjax(root.goodsInter.goods_getAttributeCode, 'post', user_data, succCallBack);
    } else {
        layer.msg('请选择分类', {
            icon: 5,
            time: 2000
        }, function() {});
    }

}

function eidtPropertyInp1(className, lableName, inpName, propertycode, inpValue, attributeId) {
    $(inpName).css({
        border: "1px #ddd solid"
    })
    $(".msgError").html("")
    sessionStorage.setItem("attributeId", attributeId);
    sessionStorage.setItem("isGoodsPropertyEdit", true);
    $(className).css({
        display: "block"
    });
    $(className).children().children("input").focus();
    $(lableName).html(propertycode);
    $(inpName).val(inpValue);
}

//属性值管理-属性值 修改一级列表
function addPropertyClass1(lableLevel, parentCateId, firstClassId) {
    $(firstClassId).css({
        border: "1px #ddd solid"
    })
    $(".msgError").html("")
    // 验证商品属性输入格式
    // var flag = validClass(firstClassId);
    // if(flag == false) {
    // 	return;
    // }
    var isGoodsPropertyEdit = sessionStorage.getItem("isGoodsPropertyEdit");
    var localStorageParameters = web.readCookie("loginData");
    var JsonObject =JSON.parse(localStorageParameters);
    if(isGoodsPropertyEdit == "true") {
        if($(firstClassId).val() == "") {
            $(firstClassId).css({
                border: "1px red solid"
            })
            $(".msgError").html("<img src='../../lib/Validform/images/error.png'>分类名称不能为空")
        }else{
            if($(firstClassId).val().length > 15){
                $(firstClassId).css({
                    border: "1px red solid"
                })
                $(".msgError").html("<img src='../../lib/Validform/images/error.png'>格式错误请重新输入")
            }else {
                $.ajax({
                    contentType: "application/json",
                    type: "POST",
                    url: root.goodsInter.goods_updateAttribute,
                    cache: false, //禁用缓存
                    dataType: "json",
                    data: JSON.stringify({
                        attributeId: sessionStorage.getItem("attributeId"),
                        attributeName: $(firstClassId).val(),
                        lastModifiedBy: JsonObject.user.user_ID
                    }),
                    success: function (result) {
                        if (result.errorCode == 0) {
                            layer.msg("修改成功", {
                                icon: 6,
                                time: 1000
                            }, function () {
                                if (lableLevel == 2) {
                                    goods_Attribute()
                                }
                            })
                        } else {
                            layer.msg(result.errorMessage, {
                                icon: 5,
                                time: 1000
                            })
                        }
                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        alert(XMLHttpRequest);
                    }
                });
            }
        }
    } else {
        if($(firstClassId).val() !== "") {
            if($(firstClassId).val().length > 15){
                $(firstClassId).css({
                    border: "1px red solid"
                })
                $(".msgError").html("<img src='../../lib/Validform/images/error.png'>格式错误请重新输入")
            }else {
                var classCodes = JSON.parse(sessionStorage.getItem("goods_addClass"));
                $.ajax({
                    contentType: "application/json",
                    type: "POST",
                    url: root.goodsInter.goods_addAttribute,
                    cache: false, //禁用缓存
                    dataType: "json",
                    data: JSON.stringify({
                            "attributeName": $(".firstProperty1").val(),
                            "attributeType": $("#attribute_type").val(),
                            "categoryId": category_idOfquery,
                            "creationBy":JsonObject.user.user_ID
                        }
                        /*{attributeName:$(firstClassId).val(),attributeType:$("#attribute_type").val(),categoryId:category_idOfquery}*/
                    ),
                    success: function(result) {
                        if(result.errorCode == 0) {
                            layer.msg("添加成功", {
                                icon: 6,
                                time: 1000
                            }, function() {
                                if(lableLevel == 2) {
                                    goods_Attribute()
                                }
                            })
                        } else {
                            layer.msg(result.errorMessage, {
                                icon: 5,
                                time: 1000
                            })
                        }
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        alert(XMLHttpRequest);
                    }
                });
            }

        } else {
            $(firstClassId).css({
                border: "1px red solid"
            })
            $(".msgError").html("<img src='../../lib/Validform/images/error.png'>分类名称不能为空")
        }
    }
}

function deletePropertyClass1(attrId) {
    var localStorageParameters = web.readCookie("loginData");
    var JsonObject =JSON.parse(localStorageParameters);
    layer.confirm('确认要删除吗？', function(index) {
        $.ajax({
            contentType: "application/json",
            type: "POST",
            url: root.goodsInter.goods_delAttribute,
            cache: false, //禁用缓存
            dataType: "json",
            data: JSON.stringify({
                categoryId: category_idOfquery,
                attributeId: attrId,
                lastModifiedBy:JsonObject.user.user_ID
            }),
            success: function(result) {
                if(result.errorCode == 0) {
                    layer.msg("删除成功", {
                        icon: 6,
                        time: 1000
                    }, function() {
                        goods_Attribute()
                    })
                } else {
                    layer.msg(result.errorMessage, {
                        icon: 5,
                        time: 1000
                    })
                }
            },
            error: function(XMLHttpRequest, textStatus, errorThrown) {
                alert(XMLHttpRequest);
            }
        });
    });
}

function goods_AttributeValue1(attribute_id,isShowInput) {
    sessionStorage.setItem("attribute_id2s", attribute_id);
    console.log(attribute_id)
    $(".goodsLableRemove2").remove();
    var user_data = {
        attribute_id: attribute_id,
    }
    var succCallBack = function(data, status, response) {
        console.log(data)
        if(data.errorCode == "0") {
            $("#propertyValue").empty();
            if(data.data == "") {
                $("#propertyValue").append('<li class="clearfix pl-10 mb-5">无数据</li>');
                $("#propertyValue").append('<li id="goodsPropertyInp2" style="display: none" class="clearfix pl-10 mb-5"><div class="f-l pd-5"><input name="property2" type="radio" value="" class="radio" /><label class="pl-10" id="goodsProperty2"></label></div><div class=" f-l class-input"><input type="text" autofocus class="input-text radius f-l firstProperty2" name="" placeholder=""><div class="f-l"><span class="msgError" style="color: red;"></span></div><div class="f-r pt-5"><a href="##" onclick="addPropertyClass2(2,\'.firstProperty2\')" class="ml-10">确认</a><a href="##" onclick="celLableFirstAdd(\'#goodsPropertyInp2\')" class="ml-10">取消</a></div></div></li>')
                if(isShowInput == true){
                    $("#goodsProperty2").html(JSON.stringify(sessionStorage.getItem("goods_addClass")).code);
                    $("#goodsPropertyInp2").css({
                        display:"block"
                    })
                }
            } else {
                $("#propertyValue").append('<li id="goodsPropertyInp2" style="display: none" class="clearfix pl-10 mb-5"><div class="f-l pd-5"><input name="property2" type="radio" value="" class="radio" /><label class="pl-10" id="goodsProperty2"></label></div><div class=" f-l class-input"><input type="text" autofocus class="input-text radius f-l firstProperty2" name="" placeholder=""><div class="f-l"><span class="msgError" style="color: red;"></span></div><div class="f-r pt-5"><a href="##" onclick="addPropertyClass2(2,\'.firstProperty2\')" class="ml-10">确认</a><a href="##" onclick="celLableFirstAdd(\'#goodsPropertyInp2\')" class="ml-10">取消</a></div></div></li>')
                if(isShowInput == true){
                    $("#goodsProperty2").html(JSON.stringify(sessionStorage.getItem("goods_addClass")).code);
                    $("#goodsPropertyInp2").css({
                        display:"block"
                    })
                }
                for(var i = 0; i < data.data.length; i++) {
                    $("#propertyValue").append('<li class="clearfix pl-10 mb-5"><div class="f-l pd-5">' + '<input name="property2" type="radio" value="' + data.data[i].attri_value_code + '" class="radio" />' + '<label class="pl-10">' + data.data[i].attri_value_code + ' <input title="' + data.data[i].attri_value + '" type="text" value="' + data.data[i].attri_value + '" disabled style="height: 24px;width: 145px;border: 0px;background: white;margin-top: -4px"></label>' + '</div><div class="f-r mt-5"><a href="##" onclick="eidtPropertyInp2(\'#goodsPropertyInp2\',\'#goodsProperty2\',\'.firstProperty2\',\'' + data.data[i].attri_value_code + '\',\'' + data.data[i].attri_value + '\',\'' + data.data[i].attri_value_id + '\')" class="Hui-iconfont icon-edit mr-10 powerButton 406">&#xe6df;</a><a href="##" onclick="deletePropertyValue(\'' + data.data[i].attri_value_id + '\')" class="Hui-iconfont icon-edit mr-10 powerButton 407">&#xe6e2;</a></div></li>')
                }
            }
        }
        power();
    };
    return web.doAjax(root.goodsInter.goods_listAttributeValue, 'post', user_data, succCallBack);
}

function firstPropertyAdd2(thisid,attribute_id) {
    $(".firstProperty2").css({
        border: "1px #ddd solid"
    })
    $(".msgError").html("")
    if(thisid != ""){
        console.log(thisid.parentElement.parentElement.firstChild.firstChild)
        thisid.parentElement.parentElement.firstChild.firstChild.checked = "checked";//点击加号出发单选框
        goods_AttributeValue1(thisid.parentElement.parentElement.firstChild.firstChild.value,true);
    }
    $(".firstProperty2").val("")
    $("#propertyValue").append('<li id="goodsPropertyInp2" style="display: none" class="clearfix pl-10 mb-5"><div class="f-l pd-5"><input name="property2" type="radio" value="" class="radio" /><label class="pl-10" id="goodsProperty2"></label></div><div class=" f-l class-input"><input type="text" autofocus class="input-text radius f-l firstProperty2" name="" placeholder=""><div class="f-l"><span class="msgError" style="color: red;"></span><div class="f-r pt-5"><a href="##" onclick="addPropertyClass2(2,\'.firstProperty2\')" class="ml-10">确认</a><a href="##" onclick="celLableFirstAdd(\'#goodsPropertyInp2\')" class="ml-10">取消</a></div></div></li>');
    $("#goodsPropertyInp2").css({
        display: "block"
    });
    $("#goodsPropertyInp2").children().children("input").focus();
    sessionStorage.setItem("attribute_id2", attribute_id);
    sessionStorage.setItem("isGoodsPropertyEdit", false);
    var user_data = {
        attributeId: attribute_id
    }
    var succCallBack = function(data, status, response) {
        console.log(data)
        if(data.errorCode == "0") {
            sessionStorage.setItem('goods_addClass', JSON.stringify(data.data));
            $("#goodsProperty2").html(data.data);
        }
    };
    return web.doAjax(root.goodsInter.goods_getAttriValueCode, 'post', user_data, succCallBack);
}

function eidtPropertyInp2(className, lableName, inpName, propertycode, inpValue, attributeId) {
    console.log(attributeId)
    sessionStorage.setItem("attributeId", attributeId);
    sessionStorage.setItem("isGoodsPropertyEdit", true);
    $(".firstProperty2").css({
        border: "1px #ddd solid"
    })
    $(".msgError").html("")
    $(className).css({
        display: "block"
    });
    $(className).children().children("input").focus();
    $(lableName).html(propertycode);
    $(inpName).val(inpValue);
}

//属性值管理-属性值 修改二级列表
function addPropertyClass2(lableLevel, firstClassId) {
    // 验证属性值格式
    /*var flag = validClass(firstClassId);
    if(flag == false) {
        return;
    }*/
    var isGoodsPropertyEdit = sessionStorage.getItem("isGoodsPropertyEdit");
    var attribute_id2 = sessionStorage.getItem("attribute_id2");
    //获取用户信息
    var localStorageParameters = web.readCookie("loginData");
    var JsonObject =JSON.parse(localStorageParameters);
    if(isGoodsPropertyEdit == "true") {
        if($(".firstProperty2").val() == ""){
            $(firstClassId).css({
                border: "1px red solid"
            })
            $(".msgError").html("<img src='../../lib/Validform/images/error.png'>分类名称不能为空")
        }else {
            if($(firstClassId).val().length > 15){
                $(firstClassId).css({
                    border: "1px red solid"
                })
                $(".msgError").html("<img src='../../lib/Validform/images/error.png'>格式错误请重新输入")
            }else {
                $.ajax({
                    contentType: "application/json",
                    type: "POST",
                    url: root.goodsInter.goods_updateAttriValue,
                    cache: false, //禁用缓存
                    dataType: "json",
                    data: JSON.stringify({
                        attriValueId: sessionStorage.getItem("attributeId"),
                        attriValue: $(firstClassId).val(),
                        lastModifiedBy:JsonObject.user.user_ID
                    }),
                    success: function(result) {
                        if(result.errorCode == 0) {
                            layer.msg("修改成功", {
                                icon: 6,
                                time: 1000
                            }, function() {
                                if(lableLevel == 2) {
                                    var attribute_id2 = sessionStorage.getItem("attribute_id2s")
                                    goods_AttributeValue1(attribute_id2)
                                }
                            })
                        } else {
                            layer.msg(result.errorMessage, {
                                icon: 5,
                                time: 1000
                            })
                        }
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        alert(XMLHttpRequest);
                    }
                });
            }
        }

    } else {
        if($(firstClassId).val() !== "") {
            if($(firstClassId).val().length > 15){
                $(firstClassId).css({
                    border: "1px red solid"
                })
                $(".msgError").html("<img src='../../lib/Validform/images/error.png'>格式错误请重新输入")
            }else {
                var classCodes = JSON.parse(sessionStorage.getItem("goods_addClass"));
                $.ajax({
                    contentType: "application/json",
                    type: "POST",
                    url: root.goodsInter.goods_addAttriValue,
                    cache: false, //禁用缓存
                    dataType: "json",
                    data: JSON.stringify({
                        "attriValue": $(firstClassId).val(),
                        "attributeId": attribute_id2,
                        "creationBy":JsonObject.user.user_ID
                    }),
                    success: function(result) {
                        if(result.errorCode == 0) {
                            layer.msg("添加成功", {
                                icon: 6,
                                time: 1000
                            }, function() {
                                var attribute_id2 = sessionStorage.getItem("attribute_id2s")
                                goods_AttributeValue1(attribute_id2)
                            })
                        }else{
                            layer.msg(result.errorMessage, {
                                icon: 5,
                                time: 1000
                            }, function() {})
                        }
                        power();
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        alert(XMLHttpRequest);
                    }
                });
            }
        }else {
            $(firstClassId).css({
                border: "1px red solid"
            })
            $(".msgError").html("<img src='../../lib/Validform/images/error.png'>分类名称不能为空")
        }
    }
}

function deletePropertyValue(attrValId) {
    layer.confirm('确认要删除吗？', function(index) {
        $.ajax({
            contentType: "application/json",
            type: "POST",
            url: root.goodsInter.goods_delAttriValue,
            cache: false, //禁用缓存
            dataType: "json",
            data: JSON.stringify({
                attriValueId: attrValId
            }),
            success: function(result) {
                if(result.errorCode == 0) {
                    layer.msg("删除成功", {
                        icon: 6,
                        time: 1000
                    }, function() {
                        var attribute_id2 = sessionStorage.getItem("attribute_id2s")
                        goods_AttributeValue1(attribute_id2)
                    })
                } else {
                    layer.msg(result.errorMessage, {
                        icon: 5,
                        time: 1000
                    })
                }
                power();
            },
            error: function(XMLHttpRequest, textStatus, errorThrown) {
                alert(XMLHttpRequest);
            }
        });
    });
}

function celLableFirstAdd(classId) {
    layer.confirm('确定要取消吗?', function(index) {
        layer.msg('已取消', {
            icon: 1,
            time: 1000 //2秒关闭（如果不配置，默认是3秒）
        }, function() {
            $(classId).css({
                display: "none"
            });
            $(classId).css({
                display: "none"
            });
            $(".firstProperty1").val();
            $(".firstProperty2").val();
            layer.close(index);
        });

    });

}

/*属性管理------end------------------------------------------------------------------------*/